import { reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { FormInstance, FormRules } from 'element-plus';

// 从element导入表单类型校验
// eslint-disable-next-line
export default await (async () => {
const __VLS_setup = async () => {
const router = useRouter(); // router就等于配置api当中的 this.$router

interface Userinfo {
uname: string;
pwd: string;
code: string;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const userinfo = reactive<Userinfo>({
uname: 'test123',
pwd: '44123',
code: '123456',
});
// 表单验证
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const rules = reactive<FormRules>({
uname: [
{ required: true, message: '用户名必须写', trigger: 'blur' },
{ min: 5, message: '用户名不能少于5歌字符', trigger: 'blur' },
],
pwd: [
{ required: true, message: '密码必须填写', trigger: 'blur' },
],
code: [
{ required: true, message: '验证码必填', trigger: 'blur' },
{ len: 6, message: '验证码必须是6位', trigger: 'blur' },
],
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const myForm = ref<FormInstance>();
const handleLogin = async () => {
console.log('userinfo', userinfo);
(myForm.value as FormInstance).validate((isValid, invalidFields) => {
console.log('检验的结果是', isValid);
console.log('没有通过检验的字段是', invalidFields);
// eslint-disable-next-line
if (isValid) {
// 跳转
// router.replace('/index');
router.replace({
name: 'home',
query: {
user: userinfo.uname,
a: 123,
},
});
}
});
};
const __VLS_Component = (await import('vue')).defineComponent({
setup() {
return {};
},

name: 'longPage',
});

const __VLS_options = {
...({
name: 'longPage',
}),
};

const __VLS_name = (await import('./__VLS_types.js')).getNameOption({
name: 'longPage',
} as const);
function __VLS_template() {
import * as __VLS_types from './__VLS_types.js'; import('./__VLS_types.js');
let __VLS_ctx!: __VLS_types.PickNotAny<__VLS_Ctx, {}> & InstanceType<__VLS_types.PickNotAny<typeof __VLS_Component, new () => {}>> & InstanceType<__VLS_types.PickNotAny<typeof __VLS_component, new () => {}>> & {};
let __VLS_vmUnwrap!: typeof __VLS_options & { components: {}; };
/* Components */
let __VLS_otherComponents!: NonNullable<typeof __VLS_component extends { components: infer C; } ? C : {}> & __VLS_types.GlobalComponents & typeof __VLS_vmUnwrap.components & __VLS_types.PickComponents<typeof __VLS_ctx>;
let __VLS_selfComponent!: __VLS_types.SelfComponent<typeof __VLS_name, typeof __VLS_component & (new () => { $slots: typeof __VLS_slots; })>;
let __VLS_components!: typeof __VLS_otherComponents & Omit<typeof __VLS_selfComponent, keyof typeof __VLS_otherComponents>;
__VLS_components['/* __VLS_.SearchTexts.Components */'];
({} as __VLS_types.GlobalAttrs)['/* __VLS_.SearchTexts.GlobalAttrs */'];
/* Style Scoped */
type __VLS_StyleScopedClasses = {} &
{ 'loginpage'?: boolean; } &
{ 'bg'?: boolean; } &
{ 'loginzone'?: boolean; } &
{ 'loginpage'?: boolean; } &
{ 'bg'?: boolean; } &
{ 'loginzone'?: boolean; } &
{ 'loginzone'?: boolean; } &
{ 'loginbox'?: boolean; } &
{ 'code'?: boolean; } &
{ 'mt20'?: boolean; };
let __VLS_styleScopedClasses!: __VLS_StyleScopedClasses | keyof __VLS_StyleScopedClasses | (keyof __VLS_StyleScopedClasses)[];
/* CSS variable injection */
/* CSS variable injection end */
declare const ElForm: __VLS_types.ConvertInvalidJsxElement<
'el-form' extends keyof typeof __VLS_components ? typeof __VLS_components['el-form'] : 'elForm' extends keyof typeof __VLS_components ? typeof __VLS_components['elForm'] : 'ElForm' extends keyof typeof __VLS_components ? typeof __VLS_components['ElForm'] : 'el-form' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-form'] : 'elForm' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elForm'] : 'ElForm' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElForm'] : unknown>;
__VLS_components['el-form']; __VLS_components.elForm; __VLS_components.ElForm;
__VLS_components['el-form']; __VLS_components.elForm; __VLS_components.ElForm;
__VLS_ctx['el-form']; __VLS_ctx.elForm; __VLS_ctx.ElForm;
__VLS_ctx['el-form']; __VLS_ctx.elForm; __VLS_ctx.ElForm;
declare const __VLS_0: __VLS_types.ExtractEmit2<typeof ElForm>;
/* Completion: Emits */
// @ts-ignore
__VLS_0('/* __VLS_.SearchTexts.Completion.Emit.el-form */');
// @ts-ignore
__VLS_0('/* __VLS_.SearchTexts.Completion.Emit.elForm */');
// @ts-ignore
__VLS_0('/* __VLS_.SearchTexts.Completion.Emit.ElForm */');
/* Completion: Props */
// @ts-ignore
(<ElForm /* __VLS_.SearchTexts.Completion.Props.el-form */ />);
// @ts-ignore
(<ElForm /* __VLS_.SearchTexts.Completion.Props.elForm */ />);
// @ts-ignore
(<ElForm /* __VLS_.SearchTexts.Completion.Props.ElForm */ />);
declare const ElFormItem: __VLS_types.ConvertInvalidJsxElement<
'el-form-item' extends keyof typeof __VLS_components ? typeof __VLS_components['el-form-item'] : 'elFormItem' extends keyof typeof __VLS_components ? typeof __VLS_components['elFormItem'] : 'ElFormItem' extends keyof typeof __VLS_components ? typeof __VLS_components['ElFormItem'] : 'el-form-item' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-form-item'] : 'elFormItem' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elFormItem'] : 'ElFormItem' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElFormItem'] : unknown>;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_components['el-form-item']; __VLS_components.elFormItem; __VLS_components.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
__VLS_ctx['el-form-item']; __VLS_ctx.elFormItem; __VLS_ctx.ElFormItem;
declare const __VLS_1: __VLS_types.ExtractEmit2<typeof ElFormItem>;
/* Completion: Emits */
// @ts-ignore
__VLS_1('/* __VLS_.SearchTexts.Completion.Emit.el-form-item */');
// @ts-ignore
__VLS_1('/* __VLS_.SearchTexts.Completion.Emit.elFormItem */');
// @ts-ignore
__VLS_1('/* __VLS_.SearchTexts.Completion.Emit.ElFormItem */');
/* Completion: Props */
// @ts-ignore
(<ElFormItem /* __VLS_.SearchTexts.Completion.Props.el-form-item */ />);
// @ts-ignore
(<ElFormItem /* __VLS_.SearchTexts.Completion.Props.elFormItem */ />);
// @ts-ignore
(<ElFormItem /* __VLS_.SearchTexts.Completion.Props.ElFormItem */ />);
declare const ElInput: __VLS_types.ConvertInvalidJsxElement<
'el-input' extends keyof typeof __VLS_components ? typeof __VLS_components['el-input'] : 'elInput' extends keyof typeof __VLS_components ? typeof __VLS_components['elInput'] : 'ElInput' extends keyof typeof __VLS_components ? typeof __VLS_components['ElInput'] : 'el-input' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-input'] : 'elInput' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elInput'] : 'ElInput' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElInput'] : unknown>;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_components['el-input']; __VLS_components.elInput; __VLS_components.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
__VLS_ctx['el-input']; __VLS_ctx.elInput; __VLS_ctx.ElInput;
declare const __VLS_2: __VLS_types.ExtractEmit2<typeof ElInput>;
/* Completion: Emits */
// @ts-ignore
__VLS_2('/* __VLS_.SearchTexts.Completion.Emit.el-input */');
// @ts-ignore
__VLS_2('/* __VLS_.SearchTexts.Completion.Emit.elInput */');
// @ts-ignore
__VLS_2('/* __VLS_.SearchTexts.Completion.Emit.ElInput */');
/* Completion: Props */
// @ts-ignore
(<ElInput /* __VLS_.SearchTexts.Completion.Props.el-input */ />);
// @ts-ignore
(<ElInput /* __VLS_.SearchTexts.Completion.Props.elInput */ />);
// @ts-ignore
(<ElInput /* __VLS_.SearchTexts.Completion.Props.ElInput */ />);
declare const ElRow: __VLS_types.ConvertInvalidJsxElement<
'el-row' extends keyof typeof __VLS_components ? typeof __VLS_components['el-row'] : 'elRow' extends keyof typeof __VLS_components ? typeof __VLS_components['elRow'] : 'ElRow' extends keyof typeof __VLS_components ? typeof __VLS_components['ElRow'] : 'el-row' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-row'] : 'elRow' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elRow'] : 'ElRow' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElRow'] : unknown>;
__VLS_components['el-row']; __VLS_components.elRow; __VLS_components.ElRow;
__VLS_components['el-row']; __VLS_components.elRow; __VLS_components.ElRow;
__VLS_ctx['el-row']; __VLS_ctx.elRow; __VLS_ctx.ElRow;
__VLS_ctx['el-row']; __VLS_ctx.elRow; __VLS_ctx.ElRow;
declare const __VLS_3: __VLS_types.ExtractEmit2<typeof ElRow>;
/* Completion: Emits */
// @ts-ignore
__VLS_3('/* __VLS_.SearchTexts.Completion.Emit.el-row */');
// @ts-ignore
__VLS_3('/* __VLS_.SearchTexts.Completion.Emit.elRow */');
// @ts-ignore
__VLS_3('/* __VLS_.SearchTexts.Completion.Emit.ElRow */');
/* Completion: Props */
// @ts-ignore
(<ElRow /* __VLS_.SearchTexts.Completion.Props.el-row */ />);
// @ts-ignore
(<ElRow /* __VLS_.SearchTexts.Completion.Props.elRow */ />);
// @ts-ignore
(<ElRow /* __VLS_.SearchTexts.Completion.Props.ElRow */ />);
declare const ElCol: __VLS_types.ConvertInvalidJsxElement<
'el-col' extends keyof typeof __VLS_components ? typeof __VLS_components['el-col'] : 'elCol' extends keyof typeof __VLS_components ? typeof __VLS_components['elCol'] : 'ElCol' extends keyof typeof __VLS_components ? typeof __VLS_components['ElCol'] : 'el-col' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-col'] : 'elCol' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elCol'] : 'ElCol' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElCol'] : unknown>;
__VLS_components['el-col']; __VLS_components.elCol; __VLS_components.ElCol;
__VLS_components['el-col']; __VLS_components.elCol; __VLS_components.ElCol;
__VLS_components['el-col']; __VLS_components.elCol; __VLS_components.ElCol;
__VLS_components['el-col']; __VLS_components.elCol; __VLS_components.ElCol;
__VLS_ctx['el-col']; __VLS_ctx.elCol; __VLS_ctx.ElCol;
__VLS_ctx['el-col']; __VLS_ctx.elCol; __VLS_ctx.ElCol;
__VLS_ctx['el-col']; __VLS_ctx.elCol; __VLS_ctx.ElCol;
__VLS_ctx['el-col']; __VLS_ctx.elCol; __VLS_ctx.ElCol;
declare const __VLS_4: __VLS_types.ExtractEmit2<typeof ElCol>;
/* Completion: Emits */
// @ts-ignore
__VLS_4('/* __VLS_.SearchTexts.Completion.Emit.el-col */');
// @ts-ignore
__VLS_4('/* __VLS_.SearchTexts.Completion.Emit.elCol */');
// @ts-ignore
__VLS_4('/* __VLS_.SearchTexts.Completion.Emit.ElCol */');
/* Completion: Props */
// @ts-ignore
(<ElCol /* __VLS_.SearchTexts.Completion.Props.el-col */ />);
// @ts-ignore
(<ElCol /* __VLS_.SearchTexts.Completion.Props.elCol */ />);
// @ts-ignore
(<ElCol /* __VLS_.SearchTexts.Completion.Props.ElCol */ />);
declare const ElButton: __VLS_types.ConvertInvalidJsxElement<
'el-button' extends keyof typeof __VLS_components ? typeof __VLS_components['el-button'] : 'elButton' extends keyof typeof __VLS_components ? typeof __VLS_components['elButton'] : 'ElButton' extends keyof typeof __VLS_components ? typeof __VLS_components['ElButton'] : 'el-button' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['el-button'] : 'elButton' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['elButton'] : 'ElButton' extends keyof typeof __VLS_ctx ? typeof __VLS_ctx['ElButton'] : unknown>;
__VLS_components['el-button']; __VLS_components.elButton; __VLS_components.ElButton;
__VLS_components['el-button']; __VLS_components.elButton; __VLS_components.ElButton;
__VLS_ctx['el-button']; __VLS_ctx.elButton; __VLS_ctx.ElButton;
__VLS_ctx['el-button']; __VLS_ctx.elButton; __VLS_ctx.ElButton;
declare const __VLS_5: __VLS_types.ExtractEmit2<typeof ElButton>;
/* Completion: Emits */
// @ts-ignore
__VLS_5('/* __VLS_.SearchTexts.Completion.Emit.el-button */');
// @ts-ignore
__VLS_5('/* __VLS_.SearchTexts.Completion.Emit.elButton */');
// @ts-ignore
__VLS_5('/* __VLS_.SearchTexts.Completion.Emit.ElButton */');
/* Completion: Props */
// @ts-ignore
(<ElButton /* __VLS_.SearchTexts.Completion.Props.el-button */ />);
// @ts-ignore
(<ElButton /* __VLS_.SearchTexts.Completion.Props.elButton */ />);
// @ts-ignore
(<ElButton /* __VLS_.SearchTexts.Completion.Props.ElButton */ />);
{
<div class={"\u006c\u006f\u0067\u0069\u006e\u0070\u0061\u0067\u0065"}></div>;

{
<div class={"\u0062\u0067"}></div>;

}
{
<div class={"\u006c\u006f\u0067\u0069\u006e\u007a\u006f\u006e\u0065"}></div>;

{
<div class={"\u006c\u006f\u0067\u0069\u006e\u0062\u006f\u0078"}></div>;

{
<ElForm model={(__VLS_ctx.userinfo)} labelPosition={"\u0074\u006f\u0070"} label-position={"\u0074\u006f\u0070"} size={"\u006c\u0061\u0072\u0067\u0065"} rules={(__VLS_ctx.rules)} ref={"\u006d\u0079\u0046\u006f\u0072\u006d"}></ElForm>;

// @ts-ignore
(__VLS_ctx.myForm);
[userinfo, rules, myForm,];
{
<ElFormItem label={"\u7528\u6237\u540d"} labelWidth={"\u0031\u0030\u0030\u0070\u0078"} label-width={"\u0031\u0030\u0030\u0070\u0078"} prop={"\u0075\u006e\u0061\u006d\u0065"}></ElFormItem>;

{
<ElInput placeholder={"\u8bf7\u586b\u5199\u4f60\u7684\u7528\u6237\u540d"} clearable={true} modelValue={(__VLS_ctx.userinfo.uname)}></ElInput>;

[userinfo,];
{
<template></template>;

const __VLS_13 = new ElInput({ placeholder: ("\u8bf7\u586b\u5199\u4f60\u7684\u7528\u6237\u540d"), clearable: (true), modelValue: ((__VLS_ctx.userinfo.uname)), });
[userinfo,];
declare const __VLS_14: __VLS_types.ExtractComponentSlots<typeof __VLS_13>;
__VLS_14['prefix'];
{
<i class={"\u0069\u0063\u006f\u006e\u0066\u006f\u006e\u0074\u0020\u0069\u0063\u006f\u006e\u002d\u0069\u0063\u006f\u006e\u002d\u0074\u0065\u0073\u0074\u0031"}></i>;

}
}
}
}
{
<ElFormItem label={"\u5bc6\u7801"} labelWidth={"\u0031\u0030\u0030\u0070\u0078"} label-width={"\u0031\u0030\u0030\u0070\u0078"} prop={"\u0070\u0077\u0064"}></ElFormItem>;

{
<ElInput type={"\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064"} placeholder={"\u4e0d\u7528\u6211\u544a\u8bc9\u4f60\u5427"} modelValue={(__VLS_ctx.userinfo.pwd)} showPassword={true} show-password={true}></ElInput>;

[userinfo,];
{
<template></template>;

const __VLS_19 = new ElInput({ type: ("\u0070\u0061\u0073\u0073\u0077\u006f\u0072\u0064"), placeholder: ("\u4e0d\u7528\u6211\u544a\u8bc9\u4f60\u5427"), modelValue: ((__VLS_ctx.userinfo.pwd)), showPassword: (true), 'show-password': (true), });
[userinfo,];
declare const __VLS_20: __VLS_types.ExtractComponentSlots<typeof __VLS_19>;
__VLS_20['prefix'];
{
<i class={"\u0069\u0063\u006f\u006e\u0066\u006f\u006e\u0074\u0020\u0069\u0063\u006f\u006e\u002d\u0069\u0063\u006f\u006e\u002d\u0074\u0065\u0073\u0074"}></i>;

}
}
}
}
{
<ElFormItem label={"\u9a8c\u8bc1\u7801"} labelWidth={"\u0031\u0030\u0030\u0070\u0078"} label-width={"\u0031\u0030\u0030\u0070\u0078"} prop={"\u0063\u006f\u0064\u0065"}></ElFormItem>;

{
<ElRow style={{}}></ElRow>;

{
<ElCol span={(16)}></ElCol>;

{
<ElInput placeholder={"\u8f93\u5165\u0036\u4f4d\u9a8c\u8bc1\u7801"} modelValue={(__VLS_ctx.userinfo.code)} maxlength={"\u0036"}></ElInput>;

[userinfo,];
{
<template></template>;

const __VLS_27 = new ElInput({ placeholder: ("\u8f93\u5165\u0036\u4f4d\u9a8c\u8bc1\u7801"), modelValue: ((__VLS_ctx.userinfo.code)), maxlength: ("\u0036"), });
[userinfo,];
declare const __VLS_28: __VLS_types.ExtractComponentSlots<typeof __VLS_27>;
__VLS_28['prefix'];
{
<i class={"\u0069\u0063\u006f\u006e\u0066\u006f\u006e\u0074\u0020\u0069\u0063\u006f\u006e\u002d\u0073\u0068\u006f\u0075\u006a\u0069"}></i>;

}
}
}
}
{
<ElCol span={(7)} offset={(1)}></ElCol>;

{
<div class={"\u0063\u006f\u0064\u0065"}></div>;

}
}
}
{
<ElButton type={"\u0070\u0072\u0069\u006d\u0061\u0072\u0079"} class={"\u006d\u0074\u0032\u0030"}></ElButton>;

const __VLS_33 = new ElButton({ type: ("\u0070\u0072\u0069\u006d\u0061\u0072\u0079"), class: ("\u006d\u0074\u0032\u0030"), });
type __VLS_34 = typeof __VLS_33 extends { $props: infer Props; } ? Props & Record<string, unknown> : typeof ElButton & Record<string, unknown>;
const __VLS_35: {
'click': __VLS_types.FillingEventArg<
__VLS_types.FirstFunction<
__VLS_types.EmitEvent<typeof ElButton, 'click'>, __VLS_34['onClick'], typeof __VLS_33 extends { $emit: infer Emit; } ? __VLS_types.EmitEvent2<Emit, 'click'> : unknown, __VLS_types.GlobalAttrs['onClick']
>
>;
} = {
click: (__VLS_ctx.handleLogin)
};
[handleLogin,];
}
}
}
}
}
}
if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {
__VLS_styleScopedClasses['loginpage'];
__VLS_styleScopedClasses['bg'];
__VLS_styleScopedClasses['loginzone'];
__VLS_styleScopedClasses['loginbox'];
__VLS_styleScopedClasses['iconfont'];
__VLS_styleScopedClasses['icon-icon-test1'];
__VLS_styleScopedClasses['iconfont'];
__VLS_styleScopedClasses['icon-icon-test'];
__VLS_styleScopedClasses['iconfont'];
__VLS_styleScopedClasses['icon-shouji'];
__VLS_styleScopedClasses['code'];
__VLS_styleScopedClasses['mt20'];
}
declare var __VLS_slots: {};
return __VLS_slots;
}
const __VLS_component = (await import('vue')).defineComponent({
setup() {
return {
userinfo: userinfo,
rules: rules,
myForm: myForm,
handleLogin: handleLogin,
};
},
});
return {} as typeof __VLS_Component;
};
return await __VLS_setup();
})();
